<template>
  <div class="page-wrapper">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-size="size"
      layout="total, prev, pager, next, jumper"
      :total="total"
    ></el-pagination>
  </div>
</template>
<script>
import { constants } from "fs";
// props 事件
export default {
  props: {
    currentPage: {
      type: Number,
      default: 0
    },
    size: {
      type: Number,
      default: 5
    },
    total: {
      type: Number
    }
  },
  methods: {
    handleSizeChange(val) {
      this.$emit("handleSizeChange", val);
    },
    handleCurrentChange(val) {
      // console.log(val, "val---page");
      this.$emit("handleCurrentChange", val);
    }
  }
};
</script>